//
//  BaseView.m
//  ProjectForCustomer
//
//  Created by 钟游 on 2019/8/25.
//  Copyright © 2019年 钟游. All rights reserved.
//

#import "BaseView.h"
#import "AppDelegate.h"

@implementation BaseView

-(instancetype)init{
    self=[super init];
    if (self) {
        [self zy_setupViews];
        [self zy_bindViewModel];
    }
    return  self;
}
-(instancetype)initWithViewModel:(id<ViewModelProtocol>)viewModel{
    self=[super init];
    if (self) {
        [self zy_setupViews];
        [self zy_bindViewModel];
    }
    return self;
}
- (void)zy_bindViewModel {
}

- (void)zy_setupViews {
}

- (void)yd_addReturnKeyBoard {
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] init];
    tap.numberOfTapsRequired = 1;
    tap.numberOfTouchesRequired = 1;
    [tap.rac_gestureSignal subscribeNext:^(id x) {
        
        AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
        [appDelegate.window endEditing:YES];
    }];
    //  [self addGestureRecognizer:tap];
}
@end
